The output is the value of c, which is the sum of the variables str_a and b. Converting a decimal string into float number You may use the float class for converting a decimal string to float number. See the following example for demonstration: See online